Integrand size = 13, antiderivative size = 57 \[ \int x \sin \left (a+b \log \left (c x^n\right )\right ) \, dx=-\frac {b n x^2 \cos \left (a+b \log \left (c x^n\right )\right )}{4+b^2 n^2}+\frac {2 x^2 \sin \left (a+b \log \left (c x^n\right )\right )}{4+b^2 n^2} \]
Time = 0.06 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.77 \[ \int x \sin \left (a+b \log \left (c x^n\right )\right ) \, dx=-\frac {x^2 \left (b n \cos \left (a+b \log \left (c x^n\right )\right )-2 \sin \left (a+b \log \left (c x^n\right )\right )\right )}{4+b^2 n^2} \]
Time = 0.19 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {4988}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int x \sin \left (a+b \log \left (c x^n\right )\right ) \, dx\) |
\(\Big \downarrow \) 4988 |
\(\displaystyle \frac {2 x^2 \sin \left (a+b \log \left (c x^n\right )\right )}{b^2 n^2+4}-\frac {b n x^2 \cos \left (a+b \log \left (c x^n\right )\right )}{b^2 n^2+4}\) |
-((b*n*x^2*Cos[a + b*Log[c*x^n]])/(4 + b^2*n^2)) + (2*x^2*Sin[a + b*Log[c* x^n]])/(4 + b^2*n^2)
3.1.2.3.1 Defintions of rubi rules used
Int[((e_.)*(x_))^(m_.)*Sin[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(d_.)], x_ Symbol] :> Simp[(m + 1)*(e*x)^(m + 1)*(Sin[d*(a + b*Log[c*x^n])]/(b^2*d^2*e *n^2 + e*(m + 1)^2)), x] - Simp[b*d*n*(e*x)^(m + 1)*(Cos[d*(a + b*Log[c*x^n ])]/(b^2*d^2*e*n^2 + e*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, e, m, n}, x] & & NeQ[b^2*d^2*n^2 + (m + 1)^2, 0]
Leaf count of result is larger than twice the leaf count of optimal. \(469\) vs. \(2(57)=114\).
Time = 1.22 (sec) , antiderivative size = 470, normalized size of antiderivative = 8.25
method | result | size |
parts | \(-\frac {x b \,{\mathrm e}^{\frac {\ln \left (c \,x^{n}\right )}{n}-\frac {\ln \left (c \right )}{n}} \cos \left (a +b \ln \left (c \,x^{n}\right )\right )}{n \left (\frac {1}{n^{2}}+b^{2}\right )}+\frac {x \,{\mathrm e}^{\frac {\ln \left (c \,x^{n}\right )}{n}-\frac {\ln \left (c \right )}{n}} \sin \left (a +b \ln \left (c \,x^{n}\right )\right )}{n^{2} \left (\frac {1}{n^{2}}+b^{2}\right )}-\frac {\frac {\frac {b n \,c^{-\frac {1}{n}} {\mathrm e}^{\frac {\ln \left (c \,x^{n}\right )-n \ln \left (x \right )}{n}} x^{2} {\tan \left (\frac {a}{2}+\frac {b \ln \left (c \,x^{n}\right )}{2}\right )}^{2}}{b^{2} n^{2}+4}+\frac {4 c^{-\frac {1}{n}} {\mathrm e}^{\frac {\ln \left (c \,x^{n}\right )-n \ln \left (x \right )}{n}} x^{2} \tan \left (\frac {a}{2}+\frac {b \ln \left (c \,x^{n}\right )}{2}\right )}{b^{2} n^{2}+4}-\frac {b n \,c^{-\frac {1}{n}} {\mathrm e}^{\frac {\ln \left (c \,x^{n}\right )-n \ln \left (x \right )}{n}} x^{2}}{b^{2} n^{2}+4}}{n \left (\frac {1}{n^{2}}+b^{2}\right ) \left (1+{\tan \left (\frac {a}{2}+\frac {b \ln \left (c \,x^{n}\right )}{2}\right )}^{2}\right )}-\frac {b \left (\frac {2 c^{-\frac {1}{n}} {\mathrm e}^{\frac {\ln \left (c \,x^{n}\right )-n \ln \left (x \right )}{n}} x^{2}}{b^{2} n^{2}+4}-\frac {2 c^{-\frac {1}{n}} {\mathrm e}^{\frac {\ln \left (c \,x^{n}\right )-n \ln \left (x \right )}{n}} x^{2} {\tan \left (\frac {a}{2}+\frac {b \ln \left (c \,x^{n}\right )}{2}\right )}^{2}}{b^{2} n^{2}+4}+\frac {2 b n \,c^{-\frac {1}{n}} {\mathrm e}^{\frac {\ln \left (c \,x^{n}\right )-n \ln \left (x \right )}{n}} x^{2} \tan \left (\frac {a}{2}+\frac {b \ln \left (c \,x^{n}\right )}{2}\right )}{b^{2} n^{2}+4}\right )}{\left (\frac {1}{n^{2}}+b^{2}\right ) \left (1+{\tan \left (\frac {a}{2}+\frac {b \ln \left (c \,x^{n}\right )}{2}\right )}^{2}\right )}}{n}\) | \(470\) |
-1/n*x*b/(1/n^2+b^2)*exp(1/n*ln(c*x^n)-1/n*ln(c))*cos(a+b*ln(c*x^n))+1/n^2 *x/(1/n^2+b^2)*exp(1/n*ln(c*x^n)-1/n*ln(c))*sin(a+b*ln(c*x^n))-1/n*(1/n/(1 /n^2+b^2)*(b*n/(b^2*n^2+4)/(c^(1/n))*exp(1/n*(ln(c*x^n)-n*ln(x)))*x^2*tan( 1/2*a+1/2*b*ln(c*x^n))^2+4/(b^2*n^2+4)/(c^(1/n))*exp(1/n*(ln(c*x^n)-n*ln(x )))*x^2*tan(1/2*a+1/2*b*ln(c*x^n))-b*n/(b^2*n^2+4)/(c^(1/n))*exp(1/n*(ln(c *x^n)-n*ln(x)))*x^2)/(1+tan(1/2*a+1/2*b*ln(c*x^n))^2)-b/(1/n^2+b^2)*(2/(b^ 2*n^2+4)/(c^(1/n))*exp(1/n*(ln(c*x^n)-n*ln(x)))*x^2-2/(b^2*n^2+4)/(c^(1/n) )*exp(1/n*(ln(c*x^n)-n*ln(x)))*x^2*tan(1/2*a+1/2*b*ln(c*x^n))^2+2*b*n/(b^2 *n^2+4)/(c^(1/n))*exp(1/n*(ln(c*x^n)-n*ln(x)))*x^2*tan(1/2*a+1/2*b*ln(c*x^ n)))/(1+tan(1/2*a+1/2*b*ln(c*x^n))^2))
Time = 0.24 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.86 \[ \int x \sin \left (a+b \log \left (c x^n\right )\right ) \, dx=-\frac {b n x^{2} \cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) - 2 \, x^{2} \sin \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}{b^{2} n^{2} + 4} \]
-(b*n*x^2*cos(b*n*log(x) + b*log(c) + a) - 2*x^2*sin(b*n*log(x) + b*log(c) + a))/(b^2*n^2 + 4)
\[ \int x \sin \left (a+b \log \left (c x^n\right )\right ) \, dx=\begin {cases} \int x \sin {\left (a - \frac {2 i \log {\left (c x^{n} \right )}}{n} \right )}\, dx & \text {for}\: b = - \frac {2 i}{n} \\\int x \sin {\left (a + \frac {2 i \log {\left (c x^{n} \right )}}{n} \right )}\, dx & \text {for}\: b = \frac {2 i}{n} \\- \frac {b n x^{2} \cos {\left (a + b \log {\left (c x^{n} \right )} \right )}}{b^{2} n^{2} + 4} + \frac {2 x^{2} \sin {\left (a + b \log {\left (c x^{n} \right )} \right )}}{b^{2} n^{2} + 4} & \text {otherwise} \end {cases} \]
Piecewise((Integral(x*sin(a - 2*I*log(c*x**n)/n), x), Eq(b, -2*I/n)), (Int egral(x*sin(a + 2*I*log(c*x**n)/n), x), Eq(b, 2*I/n)), (-b*n*x**2*cos(a + b*log(c*x**n))/(b**2*n**2 + 4) + 2*x**2*sin(a + b*log(c*x**n))/(b**2*n**2 + 4), True))
Leaf count of result is larger than twice the leaf count of optimal. 219 vs. \(2 (57) = 114\).
Time = 0.24 (sec) , antiderivative size = 219, normalized size of antiderivative = 3.84 \[ \int x \sin \left (a+b \log \left (c x^n\right )\right ) \, dx=-\frac {{\left ({\left (b \cos \left (2 \, b \log \left (c\right )\right ) \cos \left (b \log \left (c\right )\right ) + b \sin \left (2 \, b \log \left (c\right )\right ) \sin \left (b \log \left (c\right )\right ) + b \cos \left (b \log \left (c\right )\right )\right )} n - 2 \, \cos \left (b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (c\right )\right ) + 2 \, \cos \left (2 \, b \log \left (c\right )\right ) \sin \left (b \log \left (c\right )\right ) - 2 \, \sin \left (b \log \left (c\right )\right )\right )} x^{2} \cos \left (b \log \left (x^{n}\right ) + a\right ) - {\left ({\left (b \cos \left (b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (c\right )\right ) - b \cos \left (2 \, b \log \left (c\right )\right ) \sin \left (b \log \left (c\right )\right ) + b \sin \left (b \log \left (c\right )\right )\right )} n + 2 \, \cos \left (2 \, b \log \left (c\right )\right ) \cos \left (b \log \left (c\right )\right ) + 2 \, \sin \left (2 \, b \log \left (c\right )\right ) \sin \left (b \log \left (c\right )\right ) + 2 \, \cos \left (b \log \left (c\right )\right )\right )} x^{2} \sin \left (b \log \left (x^{n}\right ) + a\right )}{2 \, {\left ({\left (b^{2} \cos \left (b \log \left (c\right )\right )^{2} + b^{2} \sin \left (b \log \left (c\right )\right )^{2}\right )} n^{2} + 4 \, \cos \left (b \log \left (c\right )\right )^{2} + 4 \, \sin \left (b \log \left (c\right )\right )^{2}\right )}} \]
-1/2*(((b*cos(2*b*log(c))*cos(b*log(c)) + b*sin(2*b*log(c))*sin(b*log(c)) + b*cos(b*log(c)))*n - 2*cos(b*log(c))*sin(2*b*log(c)) + 2*cos(2*b*log(c)) *sin(b*log(c)) - 2*sin(b*log(c)))*x^2*cos(b*log(x^n) + a) - ((b*cos(b*log( c))*sin(2*b*log(c)) - b*cos(2*b*log(c))*sin(b*log(c)) + b*sin(b*log(c)))*n + 2*cos(2*b*log(c))*cos(b*log(c)) + 2*sin(2*b*log(c))*sin(b*log(c)) + 2*c os(b*log(c)))*x^2*sin(b*log(x^n) + a))/((b^2*cos(b*log(c))^2 + b^2*sin(b*l og(c))^2)*n^2 + 4*cos(b*log(c))^2 + 4*sin(b*log(c))^2)
Leaf count of result is larger than twice the leaf count of optimal. 923 vs. \(2 (57) = 114\).
Time = 0.33 (sec) , antiderivative size = 923, normalized size of antiderivative = 16.19 \[ \int x \sin \left (a+b \log \left (c x^n\right )\right ) \, dx=\text {Too large to display} \]
-1/2*(b*n*x^2*e^(1/2*pi*b*n*sgn(x) - 1/2*pi*b*n + 1/2*pi*b*sgn(c) - 1/2*pi *b)*tan(1/2*b*n*log(abs(x)) + 1/2*b*log(abs(c)))^2*tan(1/2*a)^2 + b*n*x^2* e^(-1/2*pi*b*n*sgn(x) + 1/2*pi*b*n - 1/2*pi*b*sgn(c) + 1/2*pi*b)*tan(1/2*b *n*log(abs(x)) + 1/2*b*log(abs(c)))^2*tan(1/2*a)^2 - b*n*x^2*e^(1/2*pi*b*n *sgn(x) - 1/2*pi*b*n + 1/2*pi*b*sgn(c) - 1/2*pi*b)*tan(1/2*b*n*log(abs(x)) + 1/2*b*log(abs(c)))^2 - b*n*x^2*e^(-1/2*pi*b*n*sgn(x) + 1/2*pi*b*n - 1/2 *pi*b*sgn(c) + 1/2*pi*b)*tan(1/2*b*n*log(abs(x)) + 1/2*b*log(abs(c)))^2 - 4*b*n*x^2*e^(1/2*pi*b*n*sgn(x) - 1/2*pi*b*n + 1/2*pi*b*sgn(c) - 1/2*pi*b)* tan(1/2*b*n*log(abs(x)) + 1/2*b*log(abs(c)))*tan(1/2*a) - 4*b*n*x^2*e^(-1/ 2*pi*b*n*sgn(x) + 1/2*pi*b*n - 1/2*pi*b*sgn(c) + 1/2*pi*b)*tan(1/2*b*n*log (abs(x)) + 1/2*b*log(abs(c)))*tan(1/2*a) - b*n*x^2*e^(1/2*pi*b*n*sgn(x) - 1/2*pi*b*n + 1/2*pi*b*sgn(c) - 1/2*pi*b)*tan(1/2*a)^2 - b*n*x^2*e^(-1/2*pi *b*n*sgn(x) + 1/2*pi*b*n - 1/2*pi*b*sgn(c) + 1/2*pi*b)*tan(1/2*a)^2 + 4*x^ 2*e^(1/2*pi*b*n*sgn(x) - 1/2*pi*b*n + 1/2*pi*b*sgn(c) - 1/2*pi*b)*tan(1/2* b*n*log(abs(x)) + 1/2*b*log(abs(c)))^2*tan(1/2*a) + 4*x^2*e^(-1/2*pi*b*n*s gn(x) + 1/2*pi*b*n - 1/2*pi*b*sgn(c) + 1/2*pi*b)*tan(1/2*b*n*log(abs(x)) + 1/2*b*log(abs(c)))^2*tan(1/2*a) + 4*x^2*e^(1/2*pi*b*n*sgn(x) - 1/2*pi*b*n + 1/2*pi*b*sgn(c) - 1/2*pi*b)*tan(1/2*b*n*log(abs(x)) + 1/2*b*log(abs(c)) )*tan(1/2*a)^2 + 4*x^2*e^(-1/2*pi*b*n*sgn(x) + 1/2*pi*b*n - 1/2*pi*b*sgn(c ) + 1/2*pi*b)*tan(1/2*b*n*log(abs(x)) + 1/2*b*log(abs(c)))*tan(1/2*a)^2...
Time = 27.56 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.77 \[ \int x \sin \left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {x^2\,\left (2\,\sin \left (a+b\,\ln \left (c\,x^n\right )\right )-b\,n\,\cos \left (a+b\,\ln \left (c\,x^n\right )\right )\right )}{b^2\,n^2+4} \]